#include<stdio.h>
#include<unistd.h>
// ./myfile filename实现读取该文件
int main(int argc,char* argv[])
{
  if(argc != 2)
  {
    printf("Usage: %s filename\n", argv[0]);
    return 1;
  }

  FILE* fp=fopen(argv[1],"r");
  if(fp==NULL)
  {
    perror("fopen");
    return 1;
  }

  char buffer[64];
  while(fgets(buffer,sizeof(buffer),fp)!=NULL)
  {
    printf("echo:%s",buffer);
  }
  return 0;
}
